package com.example.batch.config;

import com.example.batch.listener.MyJobListener;
import com.example.batch.listener.MyStepListener;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.core.task.TaskExecutor;

/**
 * 作业基础配置类  配置公共部分的载入
 */
public class BaseConfig {


    @Autowired
    protected JobBuilderFactory jobBuilderFactory;

    @Autowired
    protected StepBuilderFactory stepBuilderFactory;

    @Autowired
    protected MyJobListener myJobListener;

    @Autowired
    protected MyStepListener myStepListener;


    @Qualifier("taskExecutor")
    @Autowired
    protected TaskExecutor taskExecutor;


}
